<template>
  <div>
    <Header/>
    <router-view></router-view>
    <Footer v-show="!$route.meta.footerIsHidden"/>
    <!-- <Footer v-show="footerIsShow"/> -->
  </div>
</template>

<script>

import {isEqPath} from '@/utils'
import Header from '@comp/Header'
import Footer from '@comp/Footer'
import { mapActions } from 'vuex'
export default {
  name:'App',
  components:{
    Header,
    Footer
  },
  mounted(){
    // 1.初始化的时候,直接让vuex去请求categoryList的数据
    this.getCategoryList();
  },
  computed:{
    footerIsShow(){
      return isEqPath.call(this,'home')||isEqPath.call(this,'search')
    },

  },
  methods:{
    ...mapActions("home", ["getCategoryList"]),
  }
}
</script>

<style lang='less' scoped>

</style>